﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WpfApplication1
{
    /// <summary>
    /// Interaction logic for WindowSelectHw.xaml
    /// </summary>
    public partial class WindowSelectHw : Window
    {
        public delegate void OnHWSelectedHandler(object sender, EventArgs e);
        public event OnHWSelectedHandler OnHWSelected;

        public string hw_name;

        public WindowSelectHw()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            selectHw1.OnHWSelected += new ControlerLib.SelectHw.OnHWSelectedHandler(selectHw1_OnHWSelected);
        }

        void selectHw1_OnHWSelected(object sender, EventArgs e)
        {
            hw_name = selectHw1.hw_name;
            if (OnHWSelected != null)
                OnHWSelected(null, e);
            this.Close();
        }


    }
}
